package com.baizhi.dao.es;

import com.baizhi.domain.es.EsArticle;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

// 自定义接口需要继承ElasticsearchRepository<实体类型,主键类型>
public interface EsArticleDao extends ElasticsearchRepository<EsArticle, Integer> {

    // 命名规则查询，根据title或content进行查询
    Page<EsArticle> findByTitleOrContent(Pageable pageable, String title, String content);
}
